package constants;

import model.enumTypes.CSMoveStyle;

/**
 * This class defines the constants linked with
 * the game's rules such as player's speeds.
 * 
 * @author Urbanek Lucas (aka NaG)
 */

public abstract class CSConstants {
	
	public static final double GRENADE_TIMEOUT = 1.7;
	public static final double GRENADE_TAKE_DELAY = 1.0;
	public static final int CROUCH_SPEED = 120;
	public static final int WALK_SPEED = 180;
	public static final int RUN_SPEED = 320;
	
	/**
	 * A utility method : it converts a movestyle
	 * into a speed (pxl/s).
	 *  
	 * @param style
	 * @return int
	 */
	public static int getSpeed(CSMoveStyle style) {
		if (style==CSMoveStyle.CROUCH)
			return CROUCH_SPEED;
		if (style==CSMoveStyle.WALK)
			return WALK_SPEED;
		if (style==CSMoveStyle.RUN)
			return RUN_SPEED;
		return 0;
	}
}
